package main

import (
	"log"
	"net"
	"net/http/fcgi"
)

// ExecFile php-cgi 可执行程序的路径
const ExecFile = "/usr/bin/php-cgi"

func main() {
	// 要监听的端口
	listener, err := net.Listen("tcp", "0.0.0.0:9000")
	if err != nil {
		log.Fatal(err)
		return
	}
	handler := &fastCgiHandler{}
	log.Fatal(fcgi.Serve(listener, handler))
}
